rust: Update to 2025.2
authorColin Walters <walters@verbum.org>
Fri, 16 May 2025 20:19:48 +0000 (16:19 -0400)
committerColin Walters <walters@verbum.org>
Fri, 16 May 2025 20:19:48 +0000 (16:19 -0400)
I want the set_null_log in particular.

12 files changed:
rust-bindings/src/auto/constants.rs
rust-bindings/src/auto/gpg_verify_result.rs
rust-bindings/src/auto/mod.rs
rust-bindings/src/auto/mutable_tree.rs
rust-bindings/src/auto/se_policy.rs
rust-bindings/src/auto/sign.rs
rust-bindings/src/auto/versions.txt
rust-bindings/sys/Cargo.toml
rust-bindings/sys/src/auto/versions.txt
rust-bindings/sys/src/lib.rs
rust-bindings/sys/tests/abi.rs
rust-bindings/sys/tests/layout.c

index c46513540b9295af77f25b5b41355cf5f43c9ae2..602ce485130f875962a4802616959f1da20f1fbb 100644 (file)
@@ -69,6 +69,10 @@ pub static REPO_METADATA_REF: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(
 #[cfg_attr(docsrs, doc(cfg(feature = "v2020_4")))]
 #[doc(alias = "OSTREE_SIGN_NAME_ED25519")]
 pub static SIGN_NAME_ED25519: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_SIGN_NAME_ED25519)};
+#[cfg(feature = "v2024_7")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2024_7")))]
+#[doc(alias = "OSTREE_SIGN_NAME_SPKI")]
+pub static SIGN_NAME_SPKI: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_SIGN_NAME_SPKI)};
 #[doc(alias = "OSTREE_SUMMARY_GVARIANT_STRING")]
 pub static SUMMARY_GVARIANT_STRING: &GStr = unsafe{GStr::from_utf8_with_nul_unchecked(ffi::OSTREE_SUMMARY_GVARIANT_STRING)};
 #[doc(alias = "OSTREE_SUMMARY_SIG_GVARIANT_STRING")]
index 7733d32deaec2ca8924886a1afe8693bb0ad95c2..25dea77239c1b40436b6b37b1ebd60df7069709e 100644 (file)
@@ -30,7 +30,7 @@ impl GpgVerifyResult {
     }
 
     //#[doc(alias = "ostree_gpg_verify_result_get")]
-    //pub fn get(&self, signature_index: u32, attrs: /*Unimplemented*/&CArray TypeId { ns_id: 1, id: 19 }) -> glib::Variant {
+    //pub fn get(&self, signature_index: u32, attrs: /*Unimplemented*/&CArray TypeId { ns_id: 1, id: 21 }) -> glib::Variant {
     //    unsafe { TODO: call ffi:ostree_gpg_verify_result_get() }
     //}
 
index d9305546b921c8b38124b201618037f6952ebfef..d5ab73b2ba9c168d3b828527ecc7c9052c280461 100644 (file)
@@ -178,6 +178,9 @@ pub use self::constants::REPO_METADATA_REF;
 #[cfg(feature = "v2020_4")]
 #[cfg_attr(docsrs, doc(cfg(feature = "v2020_4")))]
 pub use self::constants::SIGN_NAME_ED25519;
+#[cfg(feature = "v2024_7")]
+#[cfg_attr(docsrs, doc(cfg(feature = "v2024_7")))]
+pub use self::constants::SIGN_NAME_SPKI;
 pub use self::constants::SUMMARY_GVARIANT_STRING;
 pub use self::constants::SUMMARY_SIG_GVARIANT_STRING;
 pub use self::constants::TREE_GVARIANT_STRING;
index 74255e695b8ac2d2faa0bccb60954329a9d8da75..f560eede5889ff2dcf7febce31ec6012bf3f0729 100644 (file)
@@ -114,7 +114,7 @@ impl MutableTree {
 
     //#[doc(alias = "ostree_mutable_tree_get_subdirs")]
     //#[doc(alias = "get_subdirs")]
-    //pub fn subdirs(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 1, id: 23 } {
+    //pub fn subdirs(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 1, id: 25 } {
     //    unsafe { TODO: call ffi:ostree_mutable_tree_get_subdirs() }
     //}
 
index 6bbec0d8862fa08488de785ac9d609ac26487645..e833771848f59450e2818cde3d8a43d4efddb324 100644 (file)
@@ -108,6 +108,15 @@ impl SePolicy {
     pub fn rootfs_dfd(&self) -> i32 {
         ObjectExt::property(self, "rootfs-dfd")
     }
+
+    #[cfg(feature = "v2025_2")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "v2025_2")))]
+    #[doc(alias = "ostree_sepolicy_set_null_log")]
+    pub fn set_null_log() {
+        unsafe {
+            ffi::ostree_sepolicy_set_null_log();
+        }
+    }
 }
 
 unsafe impl Send for SePolicy {}
index 1748d7426fe2afec21890091be9fb363d5eedba5..bda6c8c4df1118203db22539a70b65e7aa394fb9 100644 (file)
@@ -163,6 +163,20 @@ pub trait SignExt: IsA<Sign> + 'static {
         }
     }
 
+    //#[cfg(feature = "v2025_2")]
+    //#[cfg_attr(docsrs, doc(cfg(feature = "v2025_2")))]
+    //#[doc(alias = "ostree_sign_read_pk")]
+    //fn read_pk(&self, stream: &impl IsA<gio::InputStream>) -> /*Ignored*/BlobReader {
+    //    unsafe { TODO: call ffi:ostree_sign_read_pk() }
+    //}
+
+    //#[cfg(feature = "v2025_2")]
+    //#[cfg_attr(docsrs, doc(cfg(feature = "v2025_2")))]
+    //#[doc(alias = "ostree_sign_read_sk")]
+    //fn read_sk(&self, stream: &impl IsA<gio::InputStream>) -> /*Ignored*/BlobReader {
+    //    unsafe { TODO: call ffi:ostree_sign_read_sk() }
+    //}
+
     #[cfg(feature = "v2020_2")]
     #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
     #[doc(alias = "ostree_sign_set_pk")]
index 0ee05397c1e280aa8315b9d31430a5fadf2ab275..f46cfa17ccd5e2f137443b22cc0a11fa8f5bb3c7 100644 (file)
@@ -1,2 +1,2 @@
 Generated by gir (https://github.com/gtk-rs/gir @ 5433e2582f83)
-from gir-files (@ b89f209a09cf)
+from gir-files (@ 7a32b86ee4c0)
index 6312cc5bb0409648608e1bc4237c276562926f22..de4815a911bb602ade78c244b17ab0dd9fd1bd7d 100644 (file)
@@ -70,6 +70,7 @@ v2023_8 = ["v2023_1"]
 v2023_11 = ["v2023_8"]
 v2025_1 = ["v2024_7"]
 v2024_7 = ["v2023_11"]
+v2025_2 = ["v2025_1"]
 
 [lib]
 name = "ostree_sys"
@@ -249,3 +250,6 @@ version = "2025.1"
 
 [package.metadata.system-deps.ostree_1.v2024_7]
 version = "2024.7"
+
+[package.metadata.system-deps.ostree_1.v2025_2]
+version = "2025.2"
index 0ee05397c1e280aa8315b9d31430a5fadf2ab275..f46cfa17ccd5e2f137443b22cc0a11fa8f5bb3c7 100644 (file)
@@ -1,2 +1,2 @@
 Generated by gir (https://github.com/gtk-rs/gir @ 5433e2582f83)
-from gir-files (@ b89f209a09cf)
+from gir-files (@ 7a32b86ee4c0)
index c9b571487f67e3320df549e9ea6f297747c0f82d..e79027f3b165a6db6fbfc0e99d2423e093cf7843 100644 (file)
@@ -152,6 +152,7 @@ pub const OSTREE_REPO_METADATA_REF: &[u8] = b"ostree-metadata\0";
 pub const OSTREE_SHA256_DIGEST_LEN: c_int = 32;
 pub const OSTREE_SHA256_STRING_LEN: c_int = 64;
 pub const OSTREE_SIGN_NAME_ED25519: &[u8] = b"ed25519\0";
+pub const OSTREE_SIGN_NAME_SPKI: &[u8] = b"spki\0";
 pub const OSTREE_SUMMARY_GVARIANT_STRING: &[u8] = b"(a(s(taya{sv}))a{sv})\0";
 pub const OSTREE_SUMMARY_SIG_GVARIANT_STRING: &[u8] = b"a{sv}\0";
 pub const OSTREE_TIMESTAMP: c_int = 0;
@@ -300,6 +301,28 @@ impl ::std::fmt::Debug for OstreeAsyncProgressClass {
     }
 }
 
+#[derive(Copy, Clone)]
+#[repr(C)]
+pub struct OstreeBlobReaderInterface {
+    pub g_iface: gobject::GTypeInterface,
+    pub read_blob: Option<
+        unsafe extern "C" fn(
+            *mut OstreeBlobReader,
+            *mut gio::GCancellable,
+            *mut *mut glib::GError,
+        ) -> *mut glib::GBytes,
+    >,
+}
+
+impl ::std::fmt::Debug for OstreeBlobReaderInterface {
+    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+        f.debug_struct(&format!("OstreeBlobReaderInterface @ {self:p}"))
+            .field("g_iface", &self.g_iface)
+            .field("read_blob", &self.read_blob)
+            .finish()
+    }
+}
+
 #[derive(Copy, Clone)]
 #[repr(C)]
 pub struct OstreeCollectionRef {
@@ -1119,6 +1142,19 @@ impl ::std::fmt::Debug for OstreeSysrootUpgrader {
 }
 
 // Interfaces
+#[repr(C)]
+#[allow(dead_code)]
+pub struct OstreeBlobReader {
+    _data: [u8; 0],
+    _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
+}
+
+impl ::std::fmt::Debug for OstreeBlobReader {
+    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+        write!(f, "OstreeBlobReader @ {self:p}")
+    }
+}
+
 #[repr(C)]
 #[allow(dead_code)]
 pub struct OstreeRepoFinder {
@@ -2998,6 +3034,9 @@ extern "C" {
         error: *mut *mut glib::GError,
     ) -> *mut OstreeSePolicy;
     pub fn ostree_sepolicy_fscreatecon_cleanup(unused: *mut *mut c_void);
+    #[cfg(feature = "v2025_2")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "v2025_2")))]
+    pub fn ostree_sepolicy_set_null_log();
     #[cfg(feature = "v2016_5")]
     #[cfg_attr(docsrs, doc(cfg(feature = "v2016_5")))]
     pub fn ostree_sepolicy_get_csum(self_: *mut OstreeSePolicy) -> *const c_char;
@@ -3396,6 +3435,16 @@ extern "C" {
         error: *mut *mut glib::GError,
     ) -> gboolean;
 
+    //=========================================================================
+    // OstreeBlobReader
+    //=========================================================================
+    pub fn ostree_blob_reader_get_type() -> GType;
+    pub fn ostree_blob_reader_read_blob(
+        self_: *mut OstreeBlobReader,
+        cancellable: *mut gio::GCancellable,
+        error: *mut *mut glib::GError,
+    ) -> *mut glib::GBytes;
+
     //=========================================================================
     // OstreeRepoFinder
     //=========================================================================
@@ -3554,6 +3603,18 @@ extern "C" {
     #[cfg(feature = "v2020_2")]
     #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
     pub fn ostree_sign_metadata_key(self_: *mut OstreeSign) -> *const c_char;
+    #[cfg(feature = "v2025_2")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "v2025_2")))]
+    pub fn ostree_sign_read_pk(
+        self_: *mut OstreeSign,
+        stream: *mut gio::GInputStream,
+    ) -> *mut OstreeBlobReader;
+    #[cfg(feature = "v2025_2")]
+    #[cfg_attr(docsrs, doc(cfg(feature = "v2025_2")))]
+    pub fn ostree_sign_read_sk(
+        self_: *mut OstreeSign,
+        stream: *mut gio::GInputStream,
+    ) -> *mut OstreeBlobReader;
     #[cfg(feature = "v2020_2")]
     #[cfg_attr(docsrs, doc(cfg(feature = "v2020_2")))]
     pub fn ostree_sign_set_pk(
index c6efb83a4fe860f60469f633192a0d57385b784b..cf5a3474671dcbb4070321b2716225dbe7b715df 100644 (file)
@@ -208,6 +208,13 @@ const RUST_LAYOUTS: &[(&str, Layout)] = &[
             alignment: align_of::<OstreeAsyncProgressClass>(),
         },
     ),
+    (
+        "OstreeBlobReaderInterface",
+        Layout {
+            size: size_of::<OstreeBlobReaderInterface>(),
+            alignment: align_of::<OstreeBlobReaderInterface>(),
+        },
+    ),
     (
         "OstreeChecksumFlags",
         Layout {
@@ -743,6 +750,7 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[
     ("OSTREE_SHA256_DIGEST_LEN", "32"),
     ("OSTREE_SHA256_STRING_LEN", "64"),
     ("OSTREE_SIGN_NAME_ED25519", "ed25519"),
+    ("OSTREE_SIGN_NAME_SPKI", "spki"),
     ("(gint) OSTREE_STATIC_DELTA_GENERATE_OPT_LOWLATENCY", "0"),
     ("(gint) OSTREE_STATIC_DELTA_GENERATE_OPT_MAJOR", "1"),
     ("(gint) OSTREE_STATIC_DELTA_INDEX_FLAGS_NONE", "0"),
index 0def4cc77e601c69295e8dabcb7ff61cce834933..3db57845bef2b384d4b40e54f46aee269bc7bf6a 100644 (file)
@@ -8,6 +8,7 @@
 
 int main() {
     printf("%s;%zu;%zu\n", "OstreeAsyncProgressClass", sizeof(OstreeAsyncProgressClass), alignof(OstreeAsyncProgressClass));
+    printf("%s;%zu;%zu\n", "OstreeBlobReaderInterface", sizeof(OstreeBlobReaderInterface), alignof(OstreeBlobReaderInterface));
     printf("%s;%zu;%zu\n", "OstreeChecksumFlags", sizeof(OstreeChecksumFlags), alignof(OstreeChecksumFlags));
     printf("%s;%zu;%zu\n", "OstreeCollectionRef", sizeof(OstreeCollectionRef), alignof(OstreeCollectionRef));
     printf("%s;%zu;%zu\n", "OstreeCollectionRefv", sizeof(OstreeCollectionRefv), alignof(OstreeCollectionRefv));